/**
 * Project Name:template-web
 * File Name   :CustomizedPropertyPlaceholderConfigurer.java
 * Package Name:org.cn.template.component.configurer
 * Date:2015年9月27日下午3:12:39
 * Copyright (c) 2015, http://my.oschina.net/httpssl All Rights Reserved.
 *
*/

package org.cn.template.component.configurer;

import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

/**
 * ClassName:CustomizedPropertyPlaceholderConfigurer <br/>
 * Function :TODO ADD FUNCTION. <br/>
 * Reason :TODO ADD REASON. <br/>
 * Date :2015年9月27日 下午3:12:39 <br/>
 * 
 * @author :http://my.oschina.net/httpssl
 * @email :491835898@QQ.COM
 * @since :JDK 1.7
 * @see
 */
public class CustomizedPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer
{
	public static Map<String, String> ctxPropertiesMap = new ConcurrentHashMap<String, String>(128, 0.75f, 32);

	@Override
	protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props)
			throws BeansException {
		super.processProperties(beanFactoryToProcess, props);
		for (Object key : props.keySet()) {
			String keyStr = key.toString();
			String value = props.getProperty(keyStr);
			ctxPropertiesMap.put(keyStr, value);
		}
	}
}
